import { defineStore } from 'pinia'
import request from '@/config/axios'
export const useProvinceStore = defineStore('provice',{
  state: () => ({
    provinceDate: []
  }),
  actions: {
    //行政区划数据
    async fetchProvinceData() {
      try {
        const response = await request.post({ url: '/division/list' })
        this.provinceDate = response
        console.log( response);
      } catch (error) {
        console.error('请求失败', error)
      }
    },
  },
})
